import http from "@/api";
import { OptionVo } from "@/biz/interface";
import { ModuleCommonUrl } from "..";

const moduleUrl = ModuleCommonUrl;

export const getProvinceTreeApi = () => {
  return http.post<OptionVo>(`${moduleUrl}/comapi/provincedropvo`, {});
};

export const getCityTreeApi = (params: { provinceId?: string }) => {
  return http.post<OptionVo>(`${moduleUrl}/comapi/citydropvo`, params);
};

export const getAreaTreeApi = (params: { cityId: string }) => {
  return http.post<OptionVo>(`${moduleUrl}/comapi/areadropvo`, params);
};
